package com.itheima.health.dao;

import com.itheima.health.pojo.CheckItem;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 使用tk_mybatis
 */
public interface CheckItemDao extends Mapper<CheckItem> {
    @Select("SELECT t3.* FROM t_checkgroup t1 JOIN t_checkgroup_checkitem t2 ON t1.id = t2.checkgroup_id " +
            "JOIN t_checkitem t3 ON t2.checkitem_id = t3.id WHERE t1.id = #{id}")
    List<CheckItem> selectByCheckGroupId(Integer id);
}
